﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ERP_RORZE_DLL.Assembly
{
    public partial class intem_AssemblyCheckDate : UserControl
    {
        public int funcID;
        public bool showform;        
        public intem_AssemblyCheckDate()
        {
            InitializeComponent();
            this.funcID = 0;            
            this.showform = true;
            this.itemValue.EditValue = DateTime.Now.Date;
        }

        public void setLabel(string label)
        {
            this.itemLabel.Text = label + ":";
        }

        public void setValue(DateTime value)
        {            
            this.itemValue.EditValue = value.Date;
        }

        public string getValue()
        {
            string ret = null;
            if (!string.IsNullOrEmpty(this.itemValue.EditValue.ToString()))
            {                
                ret = this.itemValue.DateTime.ToString("yyyyMMdd");
            }
            return ret;
        }

        public string getFuncName()
        {
            return this.itemLabel.Text;
        }

        public void resetValue()
        {
            this.itemValue.EditValue = DateTime.Now.Date;
        }
    }
}
